package com.ying.tests.CCCbasis.Test4Thread;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Demo {

    public static void main(String[] args) {

//        List<Life> list = Lists.newArrayList();
//        List<Husband> husbandList = Lists.newArrayList();
//        List<Wife> wifeList = Lists.newArrayList();
//        List<Marry> marryList = Lists.newArrayList();
//        husbandList.add(Husband.builder().id(1).name("明明").build());
//        husbandList.add(Husband.builder().id(2).name("🐕").build());
//        husbandList.add(Husband.builder().id(3).name("🐝").build());
//        wifeList.add(Wife.builder().id(1).name("颖颖").build());
//        wifeList.add(Wife.builder().id(2).name("🐱").build());
//        wifeList.add(Wife.builder().id(3).name("❀").build());
//        marryList.add(Marry.builder().id(1).husbandId(3).wifeId(3).build());
//        marryList.add(Marry.builder().id(2).husbandId(2).wifeId(2).build());
//        marryList.add(Marry.builder().id(3).husbandId(1).wifeId(1).build());
//
//        marryList.stream().forEach(marry -> {
//            list.add(Life.builder()
//                    .husband(husbandList.stream().filter(husband -> husband.getId() == marry.getHusbandId()).findFirst().get().getName())
//                    .wife(wifeList.stream().filter(wife -> wife.getId() == marry.getWifeId()).findFirst().get().getName())
//                    .build());
//        });
//
//        System.out.println(list.toString());
    }

}

//@Data
//@Builder
//@ToString
//@NoArgsConstructor
//@AllArgsConstructor
//class Life  {
//
//    private int id;
//    private String husband;
//    private String wife;
//    private List<Marry> marry;
//    private int dead;
//
////    @Override
////    public void run() {
////        System.out.println("当前是第" + id + "对夫妻");
////    }
//}
//@Data
//@Builder
//@ToString
//@NoArgsConstructor
//@AllArgsConstructor
//class Husband {
//    private int id;
//    private String name;
//}
//@Data
//@Builder
//@ToString
//@NoArgsConstructor
//@AllArgsConstructor
//class Wife {
//    private int id;
//    private String name;
//}
//@Data
//@Builder
//@ToString
//@NoArgsConstructor
//@AllArgsConstructor
//class Marry {
//    private int id;
//    private int husbandId;
//    private int wifeId;
//    private List<GiveBirth> giveBirth;
//    private Date time;
//}
//@Data
//@Builder
//@ToString
//@NoArgsConstructor
//@AllArgsConstructor
//class GiveBirth {
//    private int id;
//    private int count;
//}